-- monster_summon
-- create by panyl
-- 道具：召唤怪物
-- 参数列说明： ([""amount"":3,""element"":100038])：召唤3个元素id为100038的怪物

return {
    apply = function(source, target, classId, value)
        -- 召唤的数量和对应怪物的元素ID
        -- 多个怪物可在element里一起配置
        local amount = value.amount;
        local elementId = value.element;

        -- 召唤两只
        local count = 0;
        repeat
            if not InterfaceM.monsterAppear(elementId) then
                break;
            end

            count = count + 1;
        until count >= amount;
    end,
};
